package demo1.Assignment4;

/**
 * 采用策略模式完成税费计算的相关功能，并写一个测试类演示其效果。
 */
public class TestTax {

    public static void main(String[] args) {
        Context context = new Context(new CanadaTaxCalculate());
        System.out.println(context.executeStrategy(10000d));

        context = new Context(new JapanTaxCalculate());
        System.out.println(context.executeStrategy(10000d));

        context = new Context(new MexicoTaxCalculate());
        System.out.println(context.executeStrategy(10000d));

        context = new Context(new USTaxCalculate());
        System.out.println(context.executeStrategy(10000d));
    }
}
